BEGIN;

CREATE TABLE room (
    id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
	object_state VARCHAR(30) NOT NULL,
	sid VARCHAR(32) NOT NULL,
	name VARCHAR(50) NOT NULL,
    street VARCHAR(35) NOT NULL,
	zip VARCHAR(5) NOT NULL,
	city VARCHAR(30) NOT NULL,
	capacity INT(11),
	lease_price DOUBLE,
	contact_first_name VARCHAR(25),
	contact_last_name VARCHAR(35),
	phone VARCHAR(9),
	mobile VARCHAR(9),
	email VARCHAR(35),
	tax_id VARCHAR(10),
	user_id INT(11) NOT NULL,
	column_count INT(11) NOT NULL,
	row_count INT(11) NOT NULL,
	FOREIGN KEY (user_id) REFERENCES user(id) ON DELETE CASCADE,
	UNIQUE (sid)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

COMMIT;